import DefaultPage from "@/views/DefaultPage/DefaultPage.vue";
import ajaxRoutes from "./routes/ajaxRoutes.js";
import routeRoutes from "./routes/routeRoutes.js";

export default [
    {
        path: "/",
        redirect: "/default",
    },
    {
        path: "/default",
        component: DefaultPage,
        meta:{
            isHideBread:true,
            isAdmin:true
        }
    },
    {
        path: "/login",
        component: () => import(/* webpackChunkName:"part-one" */"@/views/LoginPage/LoginPage.vue"),
        meta:{
            isPublic:true
        }
    },
    {
        path: "/sing",
        // part-one.hashCode.js
        component: () => import(/* webpackChunkName:"part-one" */"@/views/SingFilePage/SingFilePage.vue"),
        meta:{
            breadcrumbs:["单文件组件"],
        }
    },
    {
        path: "/file",
        component: () => import(/* webpackChunkName:"part-one" */"@/views/FileModePage/FileModePage.vue"),
        meta:{
            breadcrumbs:["文件模块"]
        }
    },
    {
        path: "/error",
        component: () => import(/* webpackChunkName:"part-one" */"@/views/ErrorPage/ErrorPage.vue"),
        meta:{
            breadcrumbs:["工程错误和图片资源"]
        }
    },
    {
        path: "/style",
        component: () => import(/* webpackChunkName:"part-one" */"@/views/StylePage/StylePage.vue"),
        meta:{
            breadcrumbs:["样式处理"]
        }
    },
    {
        path: "/build",
        component: () => import(/* webpackChunkName:"part-one" */"@/views/BuildPage/BuildPage.vue"),
        meta:{
            breadcrumbs:["打包操作"]
        }
    },
    {
        path: "/ajax",
        component: () => import(/* webpackChunkName:"ajax-group" */"@/views/AjaxPage/AjaxPage.vue"),
        meta:{
            breadcrumbs:["ajax集成"]
        },
        // 在当前主路由下定义子路由组件
        children: ajaxRoutes
    },
    {
        path: "/route",
        component: () => import(/* webpackChunkName:"route-group" */"@/views/RoutePage/RoutePage.vue"),
        meta:{
            breadcrumbs:["路由模块"]
        },
        children: routeRoutes
    },
    {
        path: "/compapi",
        component: () => import(/* webpackChunkName:"part-one" */"@/views/CompositionView/CompositionView.vue"),
        meta:{
            breadcrumbs:["组合式API"]
        },
    },
    {
        path: "/element",
        component: () => import(/* webpackChunkName:"part-one" */"@/views/ElementUIPage/ElementUIPage.vue"),
        meta:{
            breadcrumbs:["ElementUI使用"]
        },
    },
    // {
    //     path:"/:errorPath(.*)*",
    //     redirect:"/default"
    // }
    {
        path: "/:errorPath(.*)*",
        component: () => import(/* webpackChunkName:"not-found" */"@/views/NotFound/NotFound.vue"),
        meta:{
            breadcrumbs:["资源丢失"]
        },
    },
]